var createANode = require('../parser/create-a-node');
var parseTemplate=require('../parser/parse-template');
var defineComponent=require('./define-component');

function compileComponent(ComponentClass) {
    var proto = ComponentClass.prototype;;
    if(!proto.hasOwnProperty('_cmptReady')){
        proto.components = ComponentClass.components || proto.components || {};
        var components = proto.components;
        for(var key in components){
            var componentClass = components[key];
            if (typeof componentClass === 'object') {
                components[key] = defineComponent(componentClass);
            }
        }
    }
}